3.341 \(\int \frac {\cot ^3(e+f x)}{a+b \sec ^2(e+f x)} \, dx\)

Optimal. Leaf size=74 \[ -\frac {b^2 \log \left (a \cos ^2(e+f x)+b\right )}{2 a f (a+b)^2}-\frac {\csc ^2(e+f x)}{2 f (a+b)}-\frac {(a+2 b) \log (\sin (e+f x))}{f (a+b)^2} \]

[Out]

-1/2*csc(f*x+e)^2/(a+b)/f-1/2*b^2*ln(b+a*cos(f*x+e)^2)/a/(a+b)^2/f-(a+2*b)*ln(sin(f*x+e))/(a+b)^2/f

________________________________________________________________________________________

Rubi [A]  time = 0.11, antiderivative size = 74, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {4138, 446, 88} \[ -\frac {b^2 \log \left (a \cos ^2(e+f x)+b\right )}{2 a f (a+b)^2}-\frac {\csc ^2(e+f x)}{2 f (a+b)}-\frac {(a+2 b) \log (\sin (e+f x))}{f (a+b)^2} \]

Antiderivative was successfully verified.

[In]

Int[Cot[e + f*x]^3/(a + b*Sec[e + f*x]^2),x]

[Out]

-Csc[e + f*x]^2/(2*(a + b)*f) - (b^2*Log[b + a*Cos[e + f*x]^2])/(2*a*(a + b)^2*f) - ((a + 2*b)*Log[Sin[e + f*x
]])/((a + b)^2*f)

Rule 88

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandI
ntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, p}, x] && IntegersQ[m, n] &&
(IntegerQ[p] || (GtQ[m, 0] && GeQ[n, -1]))

Rule 446

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Dist[1/n, Subst[Int
[x^(Simplify[(m + 1)/n] - 1)*(a + b*x)^p*(c + d*x)^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p, q}, x] &&
 NeQ[b*c - a*d, 0] && IntegerQ[Simplify[(m + 1)/n]]

Rule 4138

Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*tan[(e_.) + (f_.)*(x_)]^(m_.), x_Symbol] :> Module[{ff =
 FreeFactors[Cos[e + f*x], x]}, -Dist[(f*ff^(m + n*p - 1))^(-1), Subst[Int[((1 - ff^2*x^2)^((m - 1)/2)*(b + a*
(ff*x)^n)^p)/x^(m + n*p), x], x, Cos[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, n}, x] && IntegerQ[(m - 1)/2] &&
IntegerQ[n] && IntegerQ[p]

Rubi steps

\begin {align*} \int \frac {\cot ^3(e+f x)}{a+b \sec ^2(e+f x)} \, dx &=-\frac {\operatorname {Subst}\left (\int \frac {x^5}{\left (1-x^2\right )^2 \left (b+a x^2\right )} \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac {\operatorname {Subst}\left (\int \frac {x^2}{(1-x)^2 (b+a x)} \, dx,x,\cos ^2(e+f x)\right )}{2 f}\\ &=-\frac {\operatorname {Subst}\left (\int \left (\frac {1}{(a+b) (-1+x)^2}+\frac {a+2 b}{(a+b)^2 (-1+x)}+\frac {b^2}{(a+b)^2 (b+a x)}\right ) \, dx,x,\cos ^2(e+f x)\right )}{2 f}\\ &=-\frac {\csc ^2(e+f x)}{2 (a+b) f}-\frac {b^2 \log \left (b+a \cos ^2(e+f x)\right )}{2 a (a+b)^2 f}-\frac {(a+2 b) \log (\sin (e+f x))}{(a+b)^2 f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.23, size = 100, normalized size = 1.35 \[ -\frac {\sec ^2(e+f x) (a \cos (2 (e+f x))+a+2 b) \left (b^2 \log \left (-a \sin ^2(e+f x)+a+b\right )+a (a+b) \csc ^2(e+f x)+2 a (a+2 b) \log (\sin (e+f x))\right )}{4 a f (a+b)^2 \left (a+b \sec ^2(e+f x)\right )} \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[e + f*x]^3/(a + b*Sec[e + f*x]^2),x]

[Out]

-1/4*((a + 2*b + a*Cos[2*(e + f*x)])*(a*(a + b)*Csc[e + f*x]^2 + 2*a*(a + 2*b)*Log[Sin[e + f*x]] + b^2*Log[a +
 b - a*Sin[e + f*x]^2])*Sec[e + f*x]^2)/(a*(a + b)^2*f*(a + b*Sec[e + f*x]^2))

________________________________________________________________________________________

fricas [A]  time = 0.94, size = 126, normalized size = 1.70 \[ \frac {a^{2} + a b - {\left (b^{2} \cos \left (f x + e\right )^{2} - b^{2}\right )} \log \left (a \cos \left (f x + e\right )^{2} + b\right ) - 2 \, {\left ({\left (a^{2} + 2 \, a b\right )} \cos \left (f x + e\right )^{2} - a^{2} - 2 \, a b\right )} \log \left (\frac {1}{2} \, \sin \left (f x + e\right )\right )}{2 \, {\left ({\left (a^{3} + 2 \, a^{2} b + a b^{2}\right )} f \cos \left (f x + e\right )^{2} - {\left (a^{3} + 2 \, a^{2} b + a b^{2}\right )} f\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^3/(a+b*sec(f*x+e)^2),x, algorithm="fricas")

[Out]

1/2*(a^2 + a*b - (b^2*cos(f*x + e)^2 - b^2)*log(a*cos(f*x + e)^2 + b) - 2*((a^2 + 2*a*b)*cos(f*x + e)^2 - a^2
- 2*a*b)*log(1/2*sin(f*x + e)))/((a^3 + 2*a^2*b + a*b^2)*f*cos(f*x + e)^2 - (a^3 + 2*a^2*b + a*b^2)*f)

________________________________________________________________________________________

giac [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^3/(a+b*sec(f*x+e)^2),x, algorithm="giac")

[Out]

Exception raised: NotImplementedError >> Unable to parse Giac output: Unable to check sign: (2*pi/x/2)>(-2*pi/
x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)2/f*(-(1-cos(f*x+e
xp(1)))/(1+cos(f*x+exp(1)))/(16*b+16*a)+(8*(1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1)))*b+4*(1-cos(f*x+exp(1)))/(1+
cos(f*x+exp(1)))*a-b-a)/(16*b^2+32*b*a+16*a^2)/(1-cos(f*x+exp(1)))*(1+cos(f*x+exp(1)))+1/2/a*ln(abs((1-cos(f*x
+exp(1)))/(1+cos(f*x+exp(1)))+1))-b^2/(4*b^2*a+8*b*a^2+4*a^3)*ln(((1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1))))^2*b
+((1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1))))^2*a+2*(1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1)))*b-2*(1-cos(f*x+exp(1)
))/(1+cos(f*x+exp(1)))*a+b+a)+(-2*b-a)/(4*b^2+8*b*a+4*a^2)*ln(abs(1-cos(f*x+exp(1)))/abs(1+cos(f*x+exp(1)))))

________________________________________________________________________________________

maple [B]  time = 1.03, size = 158, normalized size = 2.14 \[ -\frac {b^{2} \ln \left (b +a \left (\cos ^{2}\left (f x +e \right )\right )\right )}{2 a \left (a +b \right )^{2} f}+\frac {1}{f \left (4 a +4 b \right ) \left (-1+\cos \left (f x +e \right )\right )}-\frac {\ln \left (-1+\cos \left (f x +e \right )\right ) a}{2 f \left (a +b \right )^{2}}-\frac {\ln \left (-1+\cos \left (f x +e \right )\right ) b}{f \left (a +b \right )^{2}}-\frac {1}{f \left (4 a +4 b \right ) \left (1+\cos \left (f x +e \right )\right )}-\frac {\ln \left (1+\cos \left (f x +e \right )\right ) a}{2 f \left (a +b \right )^{2}}-\frac {\ln \left (1+\cos \left (f x +e \right )\right ) b}{f \left (a +b \right )^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(f*x+e)^3/(a+b*sec(f*x+e)^2),x)

[Out]

-1/2*b^2*ln(b+a*cos(f*x+e)^2)/a/(a+b)^2/f+1/f/(4*a+4*b)/(-1+cos(f*x+e))-1/2/f/(a+b)^2*ln(-1+cos(f*x+e))*a-1/f/
(a+b)^2*ln(-1+cos(f*x+e))*b-1/f/(4*a+4*b)/(1+cos(f*x+e))-1/2/f/(a+b)^2*ln(1+cos(f*x+e))*a-1/f/(a+b)^2*ln(1+cos
(f*x+e))*b

________________________________________________________________________________________

maxima [A]  time = 0.34, size = 87, normalized size = 1.18 \[ -\frac {\frac {b^{2} \log \left (a \sin \left (f x + e\right )^{2} - a - b\right )}{a^{3} + 2 \, a^{2} b + a b^{2}} + \frac {{\left (a + 2 \, b\right )} \log \left (\sin \left (f x + e\right )^{2}\right )}{a^{2} + 2 \, a b + b^{2}} + \frac {1}{{\left (a + b\right )} \sin \left (f x + e\right )^{2}}}{2 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^3/(a+b*sec(f*x+e)^2),x, algorithm="maxima")

[Out]

-1/2*(b^2*log(a*sin(f*x + e)^2 - a - b)/(a^3 + 2*a^2*b + a*b^2) + (a + 2*b)*log(sin(f*x + e)^2)/(a^2 + 2*a*b +
 b^2) + 1/((a + b)*sin(f*x + e)^2))/f

________________________________________________________________________________________

mupad [B]  time = 4.94, size = 98, normalized size = 1.32 \[ \frac {\ln \left ({\mathrm {tan}\left (e+f\,x\right )}^2+1\right )}{2\,a\,f}-\frac {{\mathrm {cot}\left (e+f\,x\right )}^2}{2\,f\,\left (a+b\right )}-\frac {\ln \left (\mathrm {tan}\left (e+f\,x\right )\right )\,\left (a+2\,b\right )}{f\,\left (a^2+2\,a\,b+b^2\right )}-\frac {b^2\,\ln \left (b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a+b\right )}{2\,a\,f\,{\left (a+b\right )}^2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(e + f*x)^3/(a + b/cos(e + f*x)^2),x)

[Out]

log(tan(e + f*x)^2 + 1)/(2*a*f) - cot(e + f*x)^2/(2*f*(a + b)) - (log(tan(e + f*x))*(a + 2*b))/(f*(2*a*b + a^2
 + b^2)) - (b^2*log(a + b + b*tan(e + f*x)^2))/(2*a*f*(a + b)^2)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\cot ^{3}{\left (e + f x \right )}}{a + b \sec ^{2}{\left (e + f x \right )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)**3/(a+b*sec(f*x+e)**2),x)

[Out]

Integral(cot(e + f*x)**3/(a + b*sec(e + f*x)**2), x)

________________________________________________________________________________________